#ifndef GRAPHICS_H
#define GRAPHICS_H

#include <GL/glfw.h>

namespace griselda
{
    namespace graphics
    {
        /** initialize graphics stuff */
        bool init();
        void render();

        /** INLINE **/

        /**
         * Shuts down glfw.
         */
        inline void shutdown()
        {
            glfwTerminate();
        }

        /**
         * Swaps the front and back buffers and polls events
         * like mouse and keyboard input or window reshaping events.
         */
        inline void swap_buffers()
        {
            glfwSwapBuffers();
        }

        inline bool window_is_open()
        {
            return glfwGetWindowParam(GLFW_OPENED);
        }
    }
}

#endif

